<template>
  <div class="list-icons flex align-items-center content-end">
    <span class="icon-holder flex align-items-center">
      <svg-icon icon-name="like-fill"></svg-icon>
      <span>{{ space.voteCount.like }}</span>
    </span>
    <span class="icon-holder flex align-items-center">
      <svg-icon icon-name="star-fill"></svg-icon>
      <span>{{ space.voteCount.collect }}</span>
    </span>
    <span class="icon-holder flex align-items-center">
      <svg-icon :icon-name="spacePublicIcon.iconName" :tooltip="spacePublicIcon.tooltip"></svg-icon>
    </span>
  </div>
</template>

<script>
export default {
  name: 'SpacesListIcons', // 空间列表上一些点赞之类的小图标
  props: {
    space: { // 空间数据
      type: Object,
      required: true,
    },
  },
  computed: {
    // 空间是否空开
    spacePublicIcon() {
      if (this.space.public) return { iconName: 'gitlab_earth', tooltip: this.$i.SPACE_PUBLIC };
      return { iconName: 'gitlab_lock', tooltip: this.$i.SPACE_PRIVATE };
    },
  },
};
</script>

<style></style>
